const app = getApp();
const AJAX = app.$ajax,
  $wx = app.$wx;

Page({
  onLoad(){
    this.getUserAgreement();
  },

  onShareAppMessage() {

  },

  getUserAgreement(){
    AJAX.userAgreement({}).then(([status, res, msg]) => {
      if(status){
        this.setData({
          agreement: res.data
        });
      }else{
        $wx.showToast(msg);
      }
    });
  }
});